package mvc.library.impl;

import java.util.LinkedList;
import java.util.List;
import mvc.core.impl.MachuImage;
import mvc.library.ILibrary;

public class Library implements ILibrary{
	
	
	private List<MachuImage> imageList;
	private List<MachuImage> selectedImages;
	
	public Library(){
		imageList = new LinkedList<MachuImage>();
		selectedImages = new LinkedList<MachuImage>();

	}
	
	private static class LibraryHolder{
		private static final Library INSTANCE = new Library();
	}
	
	
	
	
	@Override
	public void add(MachuImage image){
		
		imageList.add(image);
		
	}
	


	@Override
	public List<MachuImage> getImageList() {
		
		return imageList;
	}


	@Override
	public void remove(MachuImage image) {
		imageList.remove(image);			
	}



	@Override
	public ILibrary getInstance() {
		
		return LibraryHolder.INSTANCE;
	}



	@Override
	public void setSelectedImages(List<MachuImage> list) {
		selectedImages = list;
		
	}



	@Override
	public List<MachuImage> getSelectedImages() {
		return selectedImages;
	}
	
	
}


